package lab02.test20;

import java.util.Scanner;

public class Test_20 {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入含有数字和字符的字符串：");
        String str=sc.nextLine();

        char [] arr=str.toCharArray();

        for (int i=0;i<arr.length;i++){
            if (arr[i]>='0'&&arr[i]<='9'){
                System.out.print(arr[i]);
            }
        }
    }
}
